package cn.livingCloud.entity.core;

import cn.livingCloud.context.BeanProvider;
import cn.livingCloud.entity.user.Member;
import cn.livingCloud.repository.MemberMapper;
import cn.livingCloud.utils.UuidGenerator;

/**
 * 推送-粉丝关联表
 */
public class PushGroupMember extends BaseEntity {

    private transient MemberMapper memberMapper = BeanProvider.getBean(MemberMapper.class);

    private String uuid = UuidGenerator.generate();

    private String pushGroupUuid;

    private String memberUuid;

    public PushGroupMember() {
    }

    public String getUuid() {
        return uuid;
    }

    public PushGroupMember setUuid(String uuid) {
        this.uuid = uuid;
        return this;
    }

    public String getPushGroupUuid() {
        return pushGroupUuid;
    }

    public PushGroupMember setPushGroupUuid(String pushGroupUuid) {
        this.pushGroupUuid = pushGroupUuid;
        return this;
    }

    public String getMemberUuid() {
        return memberUuid;
    }

    public void setMemberUuid(String memberUuid) {
        this.memberUuid = memberUuid;
    }

    public Member getMember() {
        return memberMapper.findMemberByUuid(this.memberUuid);
    }
}